-
Notifications
You must be signed in to change notification settings - Fork 81
feat: add ProcessSocketNotifications backend
#210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
- add `iocp-psn` feature gate - a new Poller with ProcessSocketNotifications - wait for waitable objects with NtAssociateWaitCompletionPacket
|
Well... I'm a little confused about why |
|
Thanks for the PR! Please bear with me, this will take me some time to review. |
|
I found that
|
|
The tests on i686 is another problem. I've reproduced the failing tests, but I don't understand why the same code works on x64 fails on x86. |
|
I'm a bit less enthusiastic about this PR at this point. For To clarify, I'd have have edge-triggered disabled entirely on Windows than have edge-triggered I/O have a different behavior on Windows than Linux. Although if the only value add of (Don't get me wrong, I appreciate the effort! It's just that from the initial issue it was implied that the addition of edge-triggered I/O to |
|
Well, I understand your choice. It's OK to not merge this PR, and I did this only for interest. Now we know the pros and cons of this implementation. Pros:
Cons:
Feel free to close this PR or just ignore it if it doesn't match your needs. |
This looks like weirdness with the API, rather than performance. Still, you're probably right. The benefits outweigh the costs. Thanks anyways! |
The original
iocpbackend is moved toiocp/wepoll. Although I would like to reuse the code, it seems that onlydur2timeoutis reused.Closes #208
Closes #141
Some comments:
iocp-psnis added. The psn backend is much like kqueue one, but different from the original wepoll one. Even theCompletionPacketis different now. I'm not sure if you like it, but my reason is to reduce the allocations:)NtAssociateWaitCompletionPacketsupport is added to simplify the backend.psnbackend doesn't support one socket being registered to multiple pollers. I have to disable some tests.psnbackend is a little different from other platforms. I have added some comments about that.I haven't filtered theREMOVEevent out, and it will be act like an empty event. I'm not sure if it will break some behaviors.Some details:
OVERLAPPEDis used or allocated.Event::keyis used aslpCompletionKey.dwNumberOfBytesTransferredcontains the event attributes.